package lispinterpreter;

/**
 * @author JuanFer
 */
public class Main {

    /**
     * @param args the command line arguments
     * @throws ParametersException
     */
    public static void main(String[] args) throws ParametersException {
	String[] ins = { 
		"(setf x 3)", 
		"(setf y 5)", 
		"(setf z 2)", 
		"(+ 1 2 (+ 1 k (- y z) x) y)" 
	};

	LispList ls = null;
	BlackBox box = new BlackBox();
	for (String s : ins) {
	    System.out.print(">> " + s + "\n   parser: "); 
	    ls = LispParser.finalParse(LispParser.initialParse(s));
	    ls.printLispList();
	    System.out.println();
	    ls = box.evaluate(ls);
	}
	
	System.out.println();
	System.out.print(">> sustitución: ");
	ls.printLispList();
    }
}
